<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="../../core/include.inc.jsp"%>
<script type="text/javascript">
  //重置
  $(".permitPartition-list-reset-button").click(function(){
    $(".permitPartition-list-div input[name='partitionName']").val("");
    $(".permitPartition_list_page_form input[name='partitionName']").val("");
    $(".permitPartition_list_page_form input[name='permitId']").val("");
    $(".permitPartition-list-div select[name='permitId']").val("-1");
    $(".permitPartition_list_page_form").submit();
  })
  //查询
  $(".permitPartition-list-search-button").click(function(){
    var partitionName = $(".permitPartition-list-div input[name='partitionName']").val();
    var permitId = $(".permitPartition-list-div select[name='permitId']").val();
    if( permitId != -1 ){
      $(".permitPartition_list_page_form input[name='permitId']").val(permitId);
    }
    $(".permitPartition_list_page_form input[name='partitionName']").val(partitionName);
    $(".permitPartition_list_page_form").submit();
  })
</script>
<%--表单区域--%>
<form id="pagerForm" onsubmit="return navTabSearch(this);" method="post" action="community_permitPartition_list" class="permitPartition_list_page_form">
  <input type="hidden" name="pageNum" value="${pageModel.pageNum}" />
  <input type="hidden" name="numPerPage" value="${pageModel.numPerPage}" />
  <input type="hidden" name="partitionName" value="${permitPartitionName}" />
  <input type="hidden" name="permitId" value="${permitId}" />
</form>

<div class="pageHeader">
  <div class="searchBar">
    <ul class="searchContent permitPartition-list-div">
      证件细分类型
      <input type="text" name="partitionName" value="${partitionName}" class="textInput" />
      &nbsp;&nbsp;
      证件名称
      <select name="permitId">
        <option value="-1">--请选择--</option>
        <c:forEach var="permit" items="${permits}">
            <option value="${permit.id}" <c:if test="${permit.id == permitId}">selected="selected" </c:if>>${permit.permitName}</option>
        </c:forEach>
      </select>
      &nbsp;&nbsp;
      <input type="button" value="查询" class="permitPartition-list-search-button" />
      &nbsp;&nbsp;
      <input type="button" value="重置" class="permitPartition-list-reset-button" />
    </ul>
  </div>
</div>
<div class="pageContent">
  <div class="panelBar">
    <ul class="toolBar">
      <li><a class="add" href="to_add_community_permitPartition" target="dialog" width="420" height="300" mask="true" title="添加证件类型">
        <span>新增</span>
      </a>
      </li>
      <li class="line">line</li>
      <li>
        <a class="edit" href="to_edit_community_permitPartition?id={permitPartition_id}" target="dialog" width="420" height="300" mask="true">
          <span>修改</span>
        </a>
      </li>
      <li class="line">line</li>
      <li>
        <a class="delete" href="delete_community_permitPartition?id={permitPartition_id}" target="ajaxTodo" title="确定要删除吗?">
          <span>删除</span>
        </a>
      </li>
      <li class="line">line</li>
    </ul>
  </div>
  <table class="table" width="100%" layoutH="110">
    <thead>
    <tr>
      <th>序号</th>
      <th>证件名称</th>
      <th>证件细分类型</th>
      <th>链接地址</th>
      <th>创建时间</th>
    </tr>
    </thead>
    <tbody>
    <c:forEach var="permitPartition" items="${permitPartitions}" varStatus="st">
      <tr target="permitPartition_id" rel="${permitPartition.id}">
        <td>${st.index+1}</td>
        <td>${permitPartition.permitName}</td>
        <td>${permitPartition.partitionName}</td>
        <td>${permitPartition.referUrl}</td>
        <td>
          <fmt:formatDate value="${permitPartition.createTime}" pattern="yyyy-MM-dd HH:mm:ss"/>
        </td>
      </tr>
    </c:forEach>
    </tbody>
  </table>
  <c:import url="../../core/pagebar.inc.jsp" />
</div>



